<title>Slow Requests</title>

<div class="card">
  <div class="card-content">
    <div class="columns">
      <div class="column">
        <h2 class="subtitle">Slow Requests (last <%= RailsPerformance.slow_requests_time_window / 60 %> minutes + slower than <%= RailsPerformance.slow_requests_threshold %>ms)<h2>
      </div>
      <div class="column is-narrow">
        <%= render "export" %> 
      </div>
    </div>

    <table id="recent" class="table is-fullwidth is-hoverable is-narrow">
      <thead>
        <tr>
          <th data-sort="string"></th>
          <th data-sort="string">Datetime</th>
          <th data-sort="string">Controller#action</th>
          <th data-sort="string">Method</th>
          <th data-sort="string">Format</th>
          <th></th>
          <th data-sort="string">Path</th>
          <th data-sort="string">Status</th>
          <th data-sort="float">Duration</th>
          <th data-sort="float">Views</th>
          <th data-sort="float">DB</th>
          <th></th>
        </tr>
      </thead>
      <tbody>
        <% if @data.empty? %>
          <tr>
            <td colspan="10">Nothing to show here. Try to make a few requests in the main app.</td>
          </tr>
        <% end %>
        <% @data.each do |e| %>
          <%= render 'recent_row', e: e %>
        <% end %>
      </tbody>
    </table>
  </div>
</div>
